package com.offcn.sellergoods.feign;

import com.offcn.entity.Result;
import com.offcn.sellergoods.pojo.Item;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient(value = "SELLERGOODS")
public interface ItemFeign {

    @GetMapping("/item/")
    public Result<List<Item>> findAll();

    @GetMapping("/item/{id}")
    public Result<Item> findItemById(@PathVariable("id") Long id);

    @PostMapping("/item/decr")
    public Result decrNum();
}
